<!--
  @author duanzuocai
  @since 2018/10/19 23:12
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss">
    <title>员工列表</title>
</head>
<body>

<div class="layui-fluid">

    <!--面包屑-->
    <blockquote class="layui-crumb">
        组织关系&nbsp;&nbsp;>&nbsp;&nbsp;
        <a lay-href="/mc/staff/list.action" lay-text="员工管理" th:text="员工管理">员工管理</a>
    </blockquote>

    <div class="layui-card">
        <div class="layui-split">&nbsp;</div>
        <form method="post" action="/mc/staff/list.action">
            <div class="layui-form" th:include="mc/staff/_query :: query "></div>
        </form>
        <div class="layui-card-body">
            <table class="layui-hide" id="zmn-staff-table" lay-filter="zmn-staff-table">
            <script type="text/html" id="zmn-staff-table-tool">
                <div class="layui-btn-container">
<!--                    <div class="layui-btn-group">-->
<!--                        <zmn th:if="${#authPermit.checkPermit('/mc/staff/updateStatus.action')}">-->
<!--                            <button class="layui-btn layui-btn-sm" lay-event="start">启用</button>-->
<!--                            <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="stop">停用</button>-->
<!--                        </zmn>-->
<!--                    </div>-->
                    <div class="layui-btn-group">
                        <zmn th:if="${#authPermit.checkPermit('/mc/staff/resetPwd.action')}">
                            <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="resetPwd">重置密码</button>
                        </zmn>
                    </div>
                    <div class="layui-btn-group">
                        <zmn th:if="${#authPermit.checkPermit('/mc/staff/detail.action')}">
                            <button class="layui-btn layui-btn-sm layui-btn-primary" lay-href="/mc/staff/detail.action">添加员工</button>
                        </zmn>
                        <zmn th:if="${#authPermit.checkPermit('/mc/staff/rebuildStaffIndex.action')}">
                            <button class="layui-btn layui-btn-sm layui-btn-primary" id="rebuildStaffIndex">重建员工索引</button>
                        </zmn>
                        <zmn th:if="${#authPermit.checkPermit('/mc/staff/toimportperformanceexcel.action')}">
                            <button class="layui-btn layui-btn-sm layui-btn-primary" onclick="importStaffPerformance()">批量导入员工绩效</button>
                        </zmn>
                    </div>
                </div>
            </script>
            </table>
        </div>
    </div>
</div>

<script id="barDemo" type="text/html">
    <a class="layui-btn layui-btn-xs" lay-event="operation" staffName="{{d.staffName}}"
       id="showMenu-{{d.staffId}}">操作</a>
</script>
<script id="toolBar" type="text/html"></script>
<script type="text/javascript" th:inline="javascript">

    var json = {
        hasView: [[${#authPermit.checkPermit('/mc/staff/list.action')}]],
        hasTempPwd: [[${#authPermit.checkPermit('/mc/staff/temporaryPwd.action')}]],
        hasEdit: [[${#authPermit.checkPermit('/mc/staff/detail.action')}]],
        hasRoleView: [[${#authPermit.checkPermit('/mc/role/staff/list.action')}]],
        hasSort: [[${#authPermit.checkPermit('/mc/staff/updateSort.action')}]],
        hasStaffPermit: [[${#authPermit.checkPermit('/mc/staff/staffPermit.action')}]],
        hasOpenIpLoginToday: [[${#authPermit.checkPermit('/mc/staff/openIpLoginToday.action')}]],
        hasOpenWhitelist: [[${#authPermit.checkPermit('/mc/staff/openWhiteList.action')}]],
        hasSynchroDingTalk: [[${#authPermit.checkPermit('/staff/dingtalk/synchro.action')}]],
        hasLeave: [[${#authPermit.checkPermit('/staff/dingtalk/leave.action')}]],
        hasStaffChange: [[${#authPermit.checkPermit('/staff/staffchangelog/list.action')}]],
        totalCount: [[${vo.totalCount}]],
        pageSize: [[${vo.pageSize}]],
        pageIndex: [[${vo.pageIndex}]],
        vo: [[${vo}]],
        items: [[${items}]]
    };

    layui.config({
        base: "/static/lay/",
        version : 202006042128
    }).extend({
        index: "lib/index",
        art_staff_list: "mc/staff/zmn.art.staff.list",
    }).use(['index', 'art_staff_list']);

</script>
</body>
</html>